Skip to content

Conversation

@hjensas
Copy link
Contributor

@hjensas hjensas commented Nov 13, 2025

Add another boolean parameter to allow not creaing the router on the ironic provisioning network.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 13, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@softwarefactory-project-zuul
Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

@hjensas hjensas force-pushed the ironic-network-hook-optout-router branch from 5b044fb to eb70881 Compare November 14, 2025 08:04
@hjensas hjensas enabled auto-merge (rebase) November 14, 2025 08:05
Copy link
Contributor

@danpawlik danpawlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose one solution.

Add another boolean parameter to allow not creaing the
router on the ironic provisioning network.

Signed-off-by: Harald Jensås <[email protected]>
@hjensas hjensas force-pushed the ironic-network-hook-optout-router branch from eb70881 to f2f46e0 Compare November 17, 2025 16:38
Copy link
Contributor

@danpawlik danpawlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole playbook require refactor - vars should be "converted" to default vaules to give possibility to overwrite them without file modification - https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence

@hjensas
Copy link
Contributor Author

hjensas commented Nov 18, 2025

the whole playbook require refactor - vars should be "converted" to default vaules to give possibility to overwrite them without file modification - https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence

We already override these parameters in jobs, and it absolutely does work.
When hooks execute variables are set at Extra vars, (for example, -e "user=my_user")(always win precedence)

Examples where we override the variables for this playbook:

@hjensas hjensas requested a review from evallesp November 18, 2025 12:41
@danpawlik
Copy link
Contributor

the whole playbook require refactor - vars should be "converted" to default vaules to give possibility to overwrite them without file modification - https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence

We already override these parameters in jobs, and it absolutely does work. When hooks execute variables are set at Extra vars, (for example, -e "user=my_user")(always win precedence)

Examples where we override the variables for this playbook:

I know how it works and where it is applied. It is just not correct to Ansible good practices. I skip topic related to nested ansible execution, but as I mentioned, if the idea is to overwrite the default values, better is to set default value via |default() than how it is now. Usually in vars you set variables that you want to stay, but in our case, mostly we are overwriting them.

@hjensas
Copy link
Contributor Author

hjensas commented Nov 18, 2025

the whole playbook require refactor - vars should be "converted" to default vaules to give possibility to overwrite them without file modification - https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence

We already override these parameters in jobs, and it absolutely does work. When hooks execute variables are set at Extra vars, (for example, -e "user=my_user")(always win precedence)
Examples where we override the variables for this playbook:

I know how it works and where it is applied. It is just not correct to Ansible good practices. I skip topic related to nested ansible execution, but as I mentioned, if the idea is to overwrite the default values, better is to set default value via |default() than how it is now. Usually in vars you set variables that you want to stay, but in our case, mostly we are overwriting them.

Ok, I can do a follow up to re-factor this and some other hooks that follow the same (anti-)pattern. 👍

@danpawlik
Copy link
Contributor

will require much work, but maybe one day it would happen. Thanks for this PR!
/lgtm

@hjensas hjensas merged commit 0b0a801 into openstack-k8s-operators:main Nov 18, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants